#ifndef VOL_AND_H
#define VOL_AND_H
#include "matrix.h"
#include "stdio.h"
#include "stdlib.h"
#include "tanOR.h"
#include <deque>
#include <list>

#include "sharedStructure.hpp"

class volAND{
public:
	volAND(){};
	~volAND(){};
	
	//std::deque<int> children;
	std::deque<tanOR*> children;

	bool insertANDVolume(mxArray *p_res_tree);
	void test(float Pmat[][4], float cam_dir[3], float &total_score, std::deque<int> &deformations);
	void inference();
	bool inferenceV2(const line &l1,const line &l2);
	bool inferenceV2(const lineVertex &line1, const lineVertex &line2);
	void argMax(volParticle_s &particle, float *p_template= NULL);
	int id;

	std::list<volParticle_s> vol_particle_list;
	void updateImageDataRef(imgData *p);
	float *SWTest(view_s &view, bool use_color);
private:
	imgData *p_img_data;
	bool updateParticleList(volParticle_s & particle);
};


#endif